package top.wangjiu.java.jvm.attribute.info;

/**
 * inner_class_info_index和outer_class_info_index指向常量池中CONSTANT_Class_info类型常量索引，该CONSTANT_Class_info类型常量指向常量池中CONSTANT_Utf8_info类型常量，分别为内部类的全限定名和宿主类的全限定名
 *
 * inner_name_index指向常量池中CONSTANT_Utf8_info类型常量的索引，为内部类名称，如果为匿名内部类，则该值为0
 *
 * inner_name_access_flags类似于access_flags，是内部类的访问标志
 */
public class InnerClassesInfo {

    private final short innerClassInfoIndex;
    private final short outerClassInfoIndex;
    private final short innerNameIndex;
    private final short innerClassAccessFlags;

    public InnerClassesInfo(short innerClassInfoIndex, short outerClassInfoIndex, short innerNameIndex, short innerClassAccessFlags){
        this.innerClassInfoIndex = innerClassInfoIndex;
        this.outerClassInfoIndex = outerClassInfoIndex;
        this.innerNameIndex = innerNameIndex;
        this.innerClassAccessFlags = innerClassAccessFlags;
    }
}
